package com.ciaojian.core.factory;

import org.springframework.data.redis.core.RedisTemplate;

/**
 * redisTemplate 工厂类
 *
 * @author oxiny
 */
public class RedisTemplateFactory {
    private static RedisTemplate<String,Object> redisTemplate;

    public static RedisTemplate<String,Object> getInstance() {
        if (RedisTemplateFactory.redisTemplate == null) {
            return RedisTemplateFactory.redisTemplate = new RedisTemplate<>();
        }
        return RedisTemplateFactory.redisTemplate;
    }
}
